﻿using BlogFile.Domain;
using BlogFile.Repository.DB;
using Core.Repository.Imp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlogFile.Repository.Imp
{
    public class UploadFileRepository : Repository<UploadFile, int>, IUploadFileRepository
    {
        public UploadFileRepository(DBContext dbContext) : base(dbContext)
        {

        }
        public async Task<UploadFile> InsertAsync(UploadFile uploadFile)
        {
            var result = await _dbContext.Set<UploadFile>().AddAsync(uploadFile);
            await _dbContext.SaveChangesAsync();
            return result.Entity;
        }
    }
}
